1. Field of the Invention
The present invention generally relates to an electronic device that has a driver stored therein and a method of controlling the electronic device, and more particularly, to a technique of installing the driver of the electronic device in an information processing apparatus to which the electronic device is to be connected as a peripheral device.
2. Description of the Related Art
There is a type of information processing system that includes an information processing apparatus and an electronic device connected to the information processing apparatus. The electronic device serves as a peripheral device for the information processing apparatus, and is controlled by the operating system (OS) of the information processing apparatus. The OS requires dedicated software to control the peripheral device. This software is referred to as a device driver or simply as a driver. The device driver is installed in the information processing apparatus, so that the peripheral device can exhibit its performance on the information processing apparatus.
FIG. 1 is a block diagram of a conventional information processing process. A peripheral device 20 having an USB (Universal Serial Bus) interface is connected to an information processing system 10 with a USB. The information processing system 10 will be hereinafter referred to simply as the “PC 10”, and the peripheral device 20 as the “USB device 20”. The USB device 20 shown in FIG. 1 is a keyboard. The PC 10 includes a USB host controller 14 and a storage device 15. The storage device 15 is a flexible magnetic disk (FD) or a CD-ROM, for example. A keyboard driver 12 and a storage device driver 13 are installed in the OS 11 of the PC 10, and are connected to the USB host controller 14 and the storage device 15 via internal buses 16 and 17, respectively. The USB device 20 includes a keyboard device 21 so as to function as a keyboard. The keyboard device 21 is connected to the USB host controller 14 via a USB cable 18. The OS 11 may be the Windows (a trademark), which is produced by Microsoft Corporation.
As the USB device 20 is connected to the PC 10 with the USB cable 18, the USB host controller 14 detects the connection of new software. To install a driver of the USB device 20, the USB host controller 14 requests for a FD or CD-ROM storing a driver to be mounted to the driver of the storage device 15. The driver (the keyboard driver 12 in this case) of the USB device 20 is read from the mounted FD, and is installed in the OS 11. In this manner, the software to control the peripheral device is installed by a recording medium and a device different from the peripheral device.
In a notebook-type personal computer or a PDA (Personal Digital Assistant), an FD drive and a CD-ROM drive are not mounted on the PC 10. Therefore, to install the keyboard driver 12 by the above method, an external device such as a USB external storage device 22 shown in FIG. 2 needs to be employed so as to connect the keyboard driver 12 to the USB host controller 14 of the PC 10 with a USB 19.
To solve this problem, Japanese Unexamined Patent Publication No. 2000-322241 discloses a structure in which the peripheral device holds software. This publication teaches that a driver is read from a storage device in a peripheral device and is automatically installed in the OS.
However, the art disclosed in this publication is based on the assumption that the storage device mounted on the peripheral unit can be always read and written, with the peripheral device being connected to a host device. Therefore, according to the art disclosed in the above publication, read and write cannot be performed when the storage device mounted on the peripheral device is disabled.
Taking as an example a case where a USB is employed as an interface with a peripheral device in the “Windows” (a trademark of Microsoft Corporation), which has the largest marketing share as the OS operating on PCs, the above-described problem of the prior art will be described below with reference to FIG. 3.
A peripheral device 23 shown in FIG. 3 is a USB device that includes a keyboard device 24 and a USB external storage device 25. The USB external storage device 25 has a keyboard driver stored therein. Before the USB external storage device 25 is connected, the keyboard driver 12 has not been installed in the OS 11. As soon as the USB device 23 is connected to the PC 10 for the first time, the USB host controller 14 automatically recognizes that the keyboard device 24 has been connected to the USB external storage device 25 via the USB host controller 14. This is because the keyboard device 24 and the USB external storage device 25 can generate transactions (operations to be performed by the PC) on a common USB interface. Since the keyboard driver has not been installed in this case, the USB host controller 14 requests for the input of the location of the file in which the driver of the keyboard device 24 is stored. Even if the OS 11 has the driver of the USB external storage device 25, it is impossible for the USB structure to read the keyboard driver from the USB external storage device 25, with an unknown keyboard driver existing, i.e., with the USB device 23 having not been recognized. Accordingly, the USB device 23 mounted on the USB external storage device 25 cannot be put into practical use.
In this case, the OS 11 requests the operator to input the location of the file in which the keyboard driver is stored. As the USB device 23 has not been recognized at this point, the USB external storage device 25 cannot be of course designated. The operator therefore needs to prepare a separate recording medium in which the keyboard driver is stored. Receiving this request, the operator inputs the location of a suitable recording medium or a file in which a suitable driver is stored, so that the installation of the keyboard driver can be resumed.
As described above, the USB external storage device 25 mounted on the USB device 23 cannot be used unless the use of the USB device 23 is allowed. Accordingly, the keyboard driver cannot be read from the USB external storage device 25 and then installed.
This problem can be seen not only with USB interfaces, but also with other type of interfaces.
Japanese Unexamined Patent Publication No. 2000-194645 discloses a technique of facilitating installation and rewrite of a driver of a peripheral device with a USB. This publication teaches that a ROM having a plurality of device drivers stored therein is installed in the USB device. When the USB device is connected to a PC, the corresponding control data is read from the ROM under the control of a USB host device, so that the USB device is set to the first configuration. The first configuration defines the state in which data can be transferred from the USB device to the host device. In this defined state, a device driver is read from the ROM, and is then transferred to the USB host device. The transferred device driver is stored in the memory of the host device. The USB host device then sends a request for another configuration to the USB device. Receiving this request, the USB device is set to the second configuration from the first configuration. Thus, the use of the function of the USB device can be allowed.
However, this method requires a special step of issuing an instruction from the USB host device to the USB device so as to switch configurations. For this reason, this method cannot be applied to a conventional PC having a USB host device installed therein as it is.